<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="author" content="得闲技术 Team">
    <meta name="copyright" content="得闲技术">
    <title>角色列表 - Powered By 得闲技术</title>
    [#include "/admin/main/resources/list.ftl"/]
</head>
<body class="admin secondary">
<main>
    <div class="container-fluid">
        [#assign activeBreadcrumb= "角色"/]
        [#include  "/admin/main/breadcrumb.ftl"/]
        <form action="list" method="get">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-12 col-sm-7">
                            <div class="btn-group">
                                [@hasPermission name="role:save" ]
                                <a class="btn btn-default" href="save" data-redirect-url="list">
                                    <i class="iconfont icon-add"></i>添加
                                </a>
                                [/@hasPermission]
                                [@hasPermission name="role:delete" ]
                                <button class="btn btn-default" type="button" data-action="delete" disabled>
                                    <i class="iconfont icon-close"></i>删除
                                </button>
                                [/@hasPermission]
                                <button class="btn btn-default" type="button" data-action="refresh">
                                    <i class="iconfont icon-refresh"></i>刷新
                                </button>
                                [#include "/admin/main/list/page_select.ftl" /]
                            </div>
                        </div>
                        <div class="col-xs-12 col-sm-5">
                            <div id="search" class="input-group">
                                <div class="input-group-btn">
                                    <button class="btn btn-default" type="button" data-toggle="dropdown">
                                            <span class="search-span">名称</span>
                                <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu">
                                    <li data-search-property="name">
                                        <a href="javascript:;">名称</a>
                                    </li>
                                </ul>
                            </div>
                            <input name="searchValue" class="form-control" type="text"
                                    value="${form.searchValue}" placeholder="搜 索"
                                    x-webkit-speech="x-webkit-speech" x-webkit-grammar="builtin:search">
                            <div class="input-group-btn">
                                <button class="btn btn-default" type="submit">
                                    <i class="iconfont icon-search"></i>
                                    <span class="text-danger">[#if page??]${page.total!0}[#else]0[/#if]</span>条 / <span class="text-danger">${page.totalPages!0}</span>页</span>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel-body padding-10">
                <div class="table-responsive">
                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th>
                                <div class="checkbox">
                                    <input type="checkbox" data-toggle="checkAll">
                                    <label></label>
                                </div>
                            </th>
                            <th>
                                <a href="javascript:;" data-order-property="identity">
                                    标识
                                    <i class="iconfont icon-biaotou-kepaixu"></i>
                                </a>
                            </th>
                            <th>
                                <a href="javascript:;" data-order-property="name">
                                    名称
                                    <i class="iconfont icon-biaotou-kepaixu"></i>
                                </a>
                            </th>
                            <th>
                                <a href="javascript:;" data-order-property="dataScope">
                                    数据权限
                                    <i class="iconfont icon-biaotou-kepaixu"></i>
                                </a>
                            </th>
                            <th>
                                <a href="javascript:;" data-order-property="isSystem">
                                    系统内置
                                    <i class="iconfont icon-biaotou-kepaixu"></i>
                                </a>
                            </th>
                            <th>
                                <a href="javascript:;" data-order-property="order">
                                    排序
                                    <i class="iconfont icon-biaotou-kepaixu"></i>
                                </a>
                            </th>
                            <th>
                                <a >
                                    描述
                                    <i class="iconfont icon-biaotou-kepaixu"></i>
                                </a>
                            </th>
                            <th>
                                <a href="javascript:;" data-order-property="createDate">
                                    创建时间
                                    <i class="iconfont icon-biaotou-kepaixu"></i>
                                </a>
                            </th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        [#list page.content as content]
                            <tr>
                                <td>
                                    <div class="checkbox">
                                        <input name="ids" type="checkbox"
                                                value="${content.id}"
                                        [#if content.isSystem]disabled="disabled"[/#if]
                                        ><label></label>
                                    </div>
                                </td>
                                <td>
                                    ${content.identity}
                                </td>
                                <td>
                                    ${content.name}
                                </td>
                                <td>
                                    ${message("DataScopeEnum." + content.dataScope)}
                                </td>
                                <td>
                                    [#if content.isSystem]
                                        <i class="text-green iconfont icon-check"></i>
                                    [#else]
                                        <i class="text-danger iconfont icon-close"></i>
                                    [/#if]
                                </td>
                                <td>
                                    ${content.order}
                                </td>
                                <td>
                                    ${content.description}
                                </td>
                                <td>
                                    <span title="${(content.createDate?string(" yyyy-MM-dd HH:mm:ss"))!}" data-toggle="tooltip">
                                        ${(content.createDate?string("yyyy-MM-dd"))!}
                                    </span>
                                </td>

                                <td>
                                    [@hasPermission name="role:update" ]
                                    <a class="btn btn-default btn-xs btn-icon"
                                            href="update?id=${content.id}" data-redirect-url="list">
                                        <i class="iconfont icon-write"></i> 编辑
                                    </a>
                                    [/@hasPermission]
                                </td>
                            </tr>
                        [/#list]
                        </tbody>
                    </table>
                </div>
            </div>
            [@pagination pageNumber=page.pageNumber totalPages = page.totalPages]
                [#include "/admin/main/list/pagination.ftl" /]
            [/@pagination]
    </div>
    </form>
    </div>
</main>
</body>
</html>
